package cn.tuling.bean;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;

@Component
@PropertySource("config/random.properties")
@ConfigurationProperties(prefix = "test")
@Data
@Validated
public class RandomBean {
    private String name;
    private Integer value;
    @NotNull
    private String desc;
}
